-- GENERATED SPELL FOR [Captain Hartford] --


function spell0_29490(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(20823,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29490', 3000, 1)
end

function spell1_29490(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(11831,pUnit)
pUnit:RegisterEvent('Sorts_29490', 8261, 1)
end

function spell2_29490(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(20822,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29490', 7000, 1)
end

function Sorts_29490(pUnit, Event)
local choix_sorts_29490 = math.random(0, 2)
if choix_sorts_29490 == 0 then
pUnit:RegisterEvent('spell0_29490', 1, 1)
end
if choix_sorts_29490 == 1 then
pUnit:RegisterEvent('spell1_29490', 1, 1)
end
if choix_sorts_29490 == 2 then
pUnit:RegisterEvent('spell2_29490', 1, 1)
end
end

function mob29490_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_29490', math.random(1500, 3000), 1)
end

function mob29490_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29490_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29490_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(29490, 1, 'mob29490_Action')
RegisterUnitEvent(29490, 2, 'mob29490_Leave')
RegisterUnitEvent(29490, 3, 'mob29490_Kill')
RegisterUnitEvent(29490, 4, 'mob29490_Die')
